<!DOCTYPE HTML>
<html manifest="../resources/manifest/clock.manifest">
  <head>
    <title>Offline Application Cache - API_update</title>
    <script src="/resources/testharness.js"></script>
    <script src="/resources/testharnessreport.js"></script>
  </head>
  <body>
    <div id="log"></div>

    <script>
      var cache = window.applicationCache;

      async_test(function(t) {
        var next = t.step_func(function() {
          cache.onnoupdate = cache.oncached = null;

          cache.update()

          t.done();
        });

        if (cache.status === cache.IDLE) {
          next();
        } else {
          cache.onnoupdate = cache.oncached = next;
        }
      });
    </script>
  </body>
</html>
